import java.util.Scanner;

public class practice {
    public static int MAX1(int m, int n){
        if(m > n){
            return m;
        }else{
            return n;
        }

    }
    public static float MAX1(float x,float y){
        if (x > y){
            return x;
        }else{
            return y;
        }
    }
    public static float MAX1(float x,float y,float z){
        float ret = MAX1(x,y);
        float ret1 = MAX1(ret,z);
        return ret1;
    }
    public static void main(String[] args) {
        Scanner scanner = new Scanner(System.in);
        System.out.println("请输入两个整数");
        int m = scanner.nextInt();
        int n = scanner.nextInt();
        int sum1 = MAX1(m,n);
        System.out.println("请输入三个小数");
        float x = scanner.nextFloat();
        float y = scanner.nextFloat();
        float z = scanner.nextFloat();
        float sum2 =MAX1(x,y,z);
        System.out.println("两个整数中最大数为"+sum1);
        System.out.println("三个小数中最大数为"+sum2);

    }

    public static int sum(int m, int n){
        return n+m;
    }
    public static float sum(float x,float y,float z){
        return x+y+z;
    }

    public static void main8(String[] args) {
        Scanner scanner = new Scanner(System.in);
        System.out.println("请输入两个整数");
        int m = scanner.nextInt();
        int n = scanner.nextInt();
        int ret = sum(m,n);
        System.out.println("请输入三个小数");
        float x = scanner.nextFloat();
        float y = scanner.nextFloat();
        float z = scanner.nextFloat();
        float ret1 = sum(x,y,z);
        System.out.println("两个整数的和为"+ret);
        System.out.println("三个小数的和为"+ret1);

    }
    public static long Fibonacci(int n){
        long num1 = 1,num2= 1,num3= num1+num2;
        if (n<=2){
            return 1;
        }
        for (int i = 2;i< n;i++){
            num3 = num1+num2;
            num1 =num2;
            num2 =num3;
        }
        return num3;
    }
    public static void main7(String[] args) {
        System.out.println("请输入一个数");
        Scanner scanner = new Scanner(System.in);
        int n =scanner.nextInt();
        long ret = Fibonacci(n);
        System.out.println("第"+n+"项Fibonacci数为"+ret);
    }
    public static int MAX2(int m, int n){
        if(m > n){
            return m;
        }else{
            return n;
        }

    }
    public static void MAX3(int m,int n,int z){
        int ret = MAX2(n,m);
        int ret2 = MAX2(ret,z);
        System.out.println("三个数中最大数为"+ret2);
    }
    public static void main6(String[] args) {
        System.out.println("请输入三个整数 m n z");
        Scanner scanner = new Scanner(System.in);
        int m = scanner.nextInt();
        int n = scanner.nextInt();
        int z = scanner.nextInt();
        MAX3(m,n,z);

    }
    public static void multiplication(int n){
        for(int i = 1;i <=n;i++){
            for(int j = 1;j <=i;j++){
                System.out.print( i +"*" +j +"=" +i*j +" ");
            }
            System.out.println();
        }
    }
    public static void main5(String[] args) {
        System.out.println("请输入一个数");
        Scanner scanner = new Scanner(System.in);
        int n = scanner.nextInt();
        multiplication(n);
    }
    public static void main4(String[] args) {
        System.out.println("请输入密码");
        Scanner sn = new Scanner(System.in);
        String str ="abcdefg";
        for (int i = 0;i < 3;i++){
            String str1 =sn.next();
            if (str1.equals(str)){
                System.out.println("密码输入正确,登录成功");
                return;
            }else{
                System.out.println("密码输入错误，请重新输入");

            }
            if(i == 2){
                System.out.println("密码输入错误超过3次，退出程序");
            }
        }

    }
    public static void reverse(int n){
        if(n==0){
            System.out.println(0);
        }
        while (n!=0){
            System.out.print(n%10+" ");

            n/=10;
        }
    }
    public static void main2(String[] args) {
        System.out.println("请输入一个整数");
        Scanner scanner = new Scanner(System.in);
        int n = scanner.nextInt();
        reverse(n);
    }
    public static double sum(int n){
        double ret = 0;
        int flag = 1;
        for(int i = 1;i <= n;i++){
            ret+=1.0/i*flag;
            flag=-flag;
        }
        return ret;

    }
    public static void main1(String[] args) {
        int n = 100;
        double x = sum(n);
        System.out.println(x);

    }
}
